package br.com.news.utils.database.interfaces;

import java.util.List;

import br.com.news.utils.database.beans.NoticiaBean;
import br.com.news.utils.database.exception.DataBaseServiceException;

public interface INoticiaServiceDb extends IServiceBaseDb<NoticiaBean, Long>{

	List<NoticiaBean> getUltimasNoticias(int qntNoticias,long idCategoria) throws DataBaseServiceException;
	
	List<NoticiaBean> getUltimasNoticiasXml(int qntNoticias) throws DataBaseServiceException;
	
	List<NoticiaBean> getNoticiasAnteriores(int qntNoticias, long idNoticia, long idCategoria) throws DataBaseServiceException;
	
	List<NoticiaBean> getNoticiasAnterioresXml(int qntNoticias, long idNoticia) throws DataBaseServiceException;
	
	List<NoticiaBean> findLastNews(long idNoticia, long idCategoria) throws DataBaseServiceException;

	public Long save(NoticiaBean noticiaBean) throws DataBaseServiceException;

	public boolean existeNoticia(NoticiaBean noticiaBean);

	NoticiaBean findNoticiaById(Long id) throws DataBaseServiceException;

	Long quantidadePaginas(long idCategoria);

	List<NoticiaBean> findNoticiasPorPagina(int linha, Long idCategoria,int quantidade);

	List<NoticiaBean> buscaNoticiaPorNome(String nome);
	
	List<NoticiaBean> findByExample(NoticiaBean noticiaBean);
	
	NoticiaBean findImageByIdNoticia(Long idNoticia) throws DataBaseServiceException;
}
